package com.icbc.dccsh.storm.mongodb.mapper;

import org.bson.Document;

import backtype.storm.tuple.ITuple;

public class JsonMongoMapper implements MongoMapper {
	@Override
    public Document toDocument(ITuple tuple) {
		String json = tuple.getStringByField("json");
		Document document = Document.parse(json);
//        Document document = new Document();
        
//        for(String field : fields){
//            document.append(field, tuple.getValueByField(field));
//        }
        return document;
    }
}
